package com.tbit.uqbike.client.service.impl;

import com.tbit.uqbike.client.dao.core.WeixinPushModelDao;
import com.tbit.uqbike.client.pojo.newEntity.WeixinPushModel;
import com.tbit.uqbike.client.service.WeixinPushModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: chen
 * @Description: 模板消息推送接口
 * @Date: 创建于 17:19 2022/7/21
 */
@Service
public class WeixinPushModelServiceImpl implements WeixinPushModelService {

    @Autowired
    private WeixinPushModelDao weixinPushModelDao;

    @Override
    public WeixinPushModel getByAccountId(Integer accountId, Integer type) {
        Map<String, Object> map = new HashMap<>();
        map.put("accountId", accountId);
        map.put("type", type);
        return weixinPushModelDao.getByAccountId(map);
    }

    @Override
    public List<WeixinPushModel> getByType(Integer accountId, List<Integer> list) {
        Map<String, Object> map = new HashMap<>();
        map.put("accountId", accountId);
        map.put("list", list);
        return weixinPushModelDao.getByType(map);
    }
}
